/**
 * 
 */
package com.lorizz.picpub.web;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

/**
 * @author wind hong
 *
 */
public class WebEnv implements ApplicationContextAware {
    
    private static WebEnv instance;
    private ApplicationContext appContext;
    
    public static WebEnv instance() {
        return instance;
    }
    
    public WebEnv() {
        instance = this;
    }

    @Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        appContext = applicationContext;
    }
    
    public ApplicationContext getApplicationContext() {
        return appContext;
    }

}
